package com.pms.dao.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import com.pms.dao.StatementsDao;
import com.pms.pojo.Department;
import com.pms.pojo.DeptTurn;
import com.pms.pojo.LeaveEmployee;
import com.pms.pojo.NewEmployee;
import com.pms.pojo.PostTurn;
import com.pms.pojo.StatementRequire;

@Repository("employeeleavedao")
public class StatementsDaoImpl implements StatementsDao {
	
	private  SqlSessionTemplate  sqlSessionTemplete;

	public void setSqlSessionTemplete(SqlSessionTemplate sqlSessionTemplete) {
		this.sqlSessionTemplete = sqlSessionTemplete;
	}
	
	@Override
	public List<Department> getDepartment() {
		String statement="com.pms.dao.StatementsDao.getDepartment";
		return this.sqlSessionTemplete.selectList(statement);
	}
	
	@Override
	public List<NewEmployee> getNewEmployee(StatementRequire Srequire) {
		String statement="com.pms.dao.StatementsDao.getNewEmployee";
		return this.sqlSessionTemplete.selectList(statement,Srequire);
	}

	@Override
	public List<LeaveEmployee> getLeavaEmployee(StatementRequire Srequire) {
		String statement="com.pms.dao.StatementsDao.getLeavaEmployee";
		return this.sqlSessionTemplete.selectList(statement,Srequire);
	}

	@Override
	public List<DeptTurn> getDeptTurn(StatementRequire Srequire) {
		String statement="com.pms.dao.StatementsDao.getDeptTurn";
		return this.sqlSessionTemplete.selectList(statement,Srequire);
	}

	@Override
	public List<PostTurn> getPostTurn(StatementRequire Srequire) {
		String statement="com.pms.dao.StatementsDao.getPostTurn";
		return this.sqlSessionTemplete.selectList(statement,Srequire);
	}



}
